<!DOCTYPE html>
<html lang="en">
<#include "common/head.html">

<body class="fix-header fix-sidebar">

<!-- Preloader - style you can find in spinners.css -->
<div class="preloader">
    <svg class="circular" viewBox="25 25 50 50">
        <circle class="path" cx="50" cy="50" r="20" fill="none"
                stroke-width="2" stroke-miterlimit="10"/>
    </svg>
</div>
<!-- Main wrapper  -->
<div id="main-wrapper">
    <!-- header header  -->
    <#include "common/header.html">
    <!-- End header header -->
    <!-- Left Sidebar  -->
    <#include "common/nav.html">
    <!-- End Left Sidebar  -->
    <!-- Page wrapper  -->
    <div class="page-wrapper">
        <!-- 锐高软件 -->
        <#include "/common/ruigao.html">

        <!--
                    作者：offline
                    时间：2018-03-26
                    描述：发起申请
                -->
        <div class="container-fluid">
            <!-- Start Page Content -->
            <div class="row justify-content-center">
                <div class="col-lg-12">
                    <div class="card">
                        <div class="card-body">
                            <div class="card-content">
                                <!-- Left sidebar -->
                                <div class="inbox-leftbar">

                                    <a href="" class="btn btn-danger btn-block waves-effect waves-light">
                                        <font style="vertical-align: inherit;">
                                            <font style="vertical-align: inherit;">返回列表</font>
                                        </font>
                                    </a>
                                </div>
                                <!-- End Left sidebar -->
                                <div class="inbox-rightbar">
                                    <div class="" role="toolbar">
                                        <div class="btn-group">
                                            <button type="button" class="btn btn-light waves-effect"><i
                                                    class="mdi mdi-archive font-18 vertical-middle"></i></button>
                                            <button type="button" class="btn btn-light waves-effect"><i
                                                    class="mdi mdi-alert-octagon font-18 vertical-middle"></i></button>
                                            <button type="button" class="btn btn-light waves-effect"><i
                                                    class="mdi mdi-delete-variant font-18 vertical-middle"></i></button>
                                        </div>

                                        <div class="btn-group">
                                            <button type="button" class="btn btn-light dropdown-toggle waves-effect"
                                                    data-toggle="dropdown" aria-expanded="false"><font
                                                    style="vertical-align: inherit;"><font
                                                    style="vertical-align: inherit;">
                                                更多
                                            </font></font><span class="caret m-l-5"></span>
                                            </button>
                                            <div class="dropdown-menu">

                                                <a class="dropdown-item" href="javascript: void(0);">1</a>
                                                <a class="dropdown-item" href="javascript: void(0);">2</a>
                                                <a class="dropdown-item" href="javascript: void(0);">3</a>
                                                <a class="dropdown-item" href="javascript: void(0);">4</a>

                                            </div>

                                        </div>

                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 获取到当前用户公司的名称 -->

                        <form class="form-valide col-lg-8" action="doaddtask"
                              id="issueaddform" style="margin: 0 auto;" method="post"
                              enctype="multipart/form-data">


                            <div class="form-validation">
                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-terms">任务名称</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-terms" name="taskTitle">
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-username">详情</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-terms" name="taskInfo">
                                    </div>
                                </div>


                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-phoneus">领取人数 </label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-terms" name="taskReceivenum">
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-skill">奖励</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-terms" name="taskReward">
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-skill">任务简单的描述</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-terms" name="taskCatalog">
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-skill">任务流程</label>
                                    <div class="col-lg-10">
                                        <input type="text" class="form-control" id="val-terms" name="taskFlowe">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-lg-2 col-form-label" for="val-skill">任务图片</label>
                                    <div id="uploadfile" class="col-lg-10">
                                        <input type="file" class="form-control" name="a_logoPicPath">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group row">
                                <div class="col-lg-8 ml-auto">
                                    <input type="submit" class="btn btn-success btn sweet-tijiao " value="更新">
                                    <button type="reset" class="btn btn-primary ">重置</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- End Container fluid  -->
<!-- footer -->
<#include "common/footer.html">
<!-- End footer -->
<!-- End Page wrapper  -->
<#include "common/js.html">
<script type="text/javascript">
    $(function () {

        /**
         * 点击删除图片
         */
        $(".taskupshow").click(function () {
            var upid = parseInt($(this).data("upid"));
            $.ajax({
                type: "GET",//请求类型
                url: "deltaskpic",//请求的url
                data: {"upid": upid},//请求参数
                dataType: "json",//ajax接口（请求url）返回的数据类型
                success: function (data) {//data：返回数据（json对象）
                    if (data) {
                        alert("删除成功！");
                        $("#uploadfile").show();
                        $(".imgys").hide();
                        $(".issueupshow").hide();
                    } else {
                        alert("删除失败！");
                    }
                },
                error: function (data) {//当访问时候，404，500 等非200的错误状态码
                    alert("请求错误！");
                }
            });

        });


    });
</script>
</body>

</html>